package com.printeverywhere.exception;

import java.util.Map;

import org.apache.log4j.Logger;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class CredentialExceptionAction extends ActionSupport{

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	private static Exception exception;
	private static final Logger log = Logger.getLogger(CredentialExceptionAction.class);

	@Override
	public String execute() throws Exception {
		ActionContext a=ActionContext.getContext();

		if(exception==null){
			Map attr = (Map) ActionContext.getContext().get("attr");
			exception=(Exception) attr.get("exception");
		}
		log.error(exception);
		return SUCCESS;
	}

}
